import request from '@/utils/request'

//考试管理-分页查询
export function getList(res) {
  return request({
    url: '/exam/getList',
    method: 'get',
    params: res
  })
}
// 考试管理-批量删除
export function delExam(ids) {
  return request({
    url: '/exam/delExam/'+ids,
    method: 'delete'
  })
}
// 考试管理-发布或收回考试
export function updateExamRelease(id,isRelease) {
  return request({
    url: '/exam/updateExamRelease/'+id+'/'+isRelease,
    method: 'get',
  })
}
// 考试管理-根据id获取考试信息
export function getExam(id) {
  return request({
    url: '/exam/getExam/'+id,
    method: 'get',
  })
}
// 考试管理-新增修改
export function editExam(data) {
  return request({
    url: '/exam/editExam',
    method: 'post',
    data: data
  })
}
//考试管理-获取考试班级信息
export function getExamClassList(id) {
  return request({
    url: '/exam/getExamClassList/'+id,
    method: 'get',
  })
}
//考试管理-获取专业考试课程多选下拉列表
export function getCourseExamTypeOption() {
  return request({
    url: '/exam/getCourseExamTypeOption',
    method: 'get',
  })
}



//考试成绩录入-根据课程类型获取该考试下的考试科目
export function getExamCourseTab(examId,courseType) {
  return request({
    url: '/exam/getExamCourseTab?examId='+examId+'&courseType='+courseType,
    method: 'get',
  })
}
//考试成绩录入-修改考试课程信息
export function editExamCourse(data) {
  return request({
    url: '/exam/editExamCourse',
    method: 'post',
    data: data
  })
}
//考试成绩录入-根据考试id,班级id,课程id获取成绩记录
export function getExamCourseScore(classId,examId,courseId,res) {
  return request({
    url: '/exam/getExamCourseScore?classId='+classId+'&examId='+examId+'&courseId='+courseId,
    method: 'get',
    params: res
  })
}
//考试成绩录入-录入学生考试课程成绩
export function enterExamCourseStudentScore(examCourseScoreVos) {
  return request({
    url: '/exam/enterExamCourseStudentScore',
    method: 'post',
    data: examCourseScoreVos
  })
}
//考试成绩录入-根据考试id,班级id获取学生总成绩记录
export function getExamTotalScore(classId,examId,res) {
  return request({
    url: '/exam/getExamTotalScore?classId='+classId+'&examId='+examId,
    method: 'get',
    params: res
  })
}











